Integrand size = 18, antiderivative size = 1092 \[ \int \frac {x^5}{\left (a+b \sec \left (c+d x^2\right )\right )^2} \, dx=-\frac {i b^2 x^4}{2 a^2 \left (a^2-b^2\right ) d}+\frac {x^6}{6 a^2}+\frac {b^2 x^2 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^2}+\frac {b^2 x^2 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^2}-\frac {i b^3 x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}+\frac {i b x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {i b^3 x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}-\frac {i b x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}-\frac {i b^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b-i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^3}-\frac {i b^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b+i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^3}-\frac {b^3 x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^2}+\frac {2 b x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {b^3 x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^2}-\frac {2 b x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}-\frac {i b^3 \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^3}+\frac {2 i b \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^3}+\frac {i b^3 \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^3}-\frac {2 i b \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^3}+\frac {b^2 x^4 \sin \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \cos \left (c+d x^2\right )\right )} \]
[Out]
Time = 2.67 (sec) , antiderivative size = 1092, normalized size of antiderivative = 1.00, number of steps used = 31, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.667, Rules used = {4289, 4276, 3405, 3402, 2296, 2221, 2611, 2320, 6724, 4618, 2317, 2438} \[ \int \frac {x^5}{\left (a+b \sec \left (c+d x^2\right )\right )^2} \, dx=\frac {x^6}{6 a^2}+\frac {i b \log \left (\frac {e^{i \left (d x^2+c\right )} a}{b-\sqrt {b^2-a^2}}+1\right ) x^4}{a^2 \sqrt {b^2-a^2} d}-\frac {i b^3 \log \left (\frac {e^{i \left (d x^2+c\right )} a}{b-\sqrt {b^2-a^2}}+1\right ) x^4}{2 a^2 \left (b^2-a^2\right )^{3/2} d}-\frac {i b \log \left (\frac {e^{i \left (d x^2+c\right )} a}{b+\sqrt {b^2-a^2}}+1\right ) x^4}{a^2 \sqrt {b^2-a^2} d}+\frac {i b^3 \log \left (\frac {e^{i \left (d x^2+c\right )} a}{b+\sqrt {b^2-a^2}}+1\right ) x^4}{2 a^2 \left (b^2-a^2\right )^{3/2} d}+\frac {b^2 \sin \left (d x^2+c\right ) x^4}{2 a \left (a^2-b^2\right ) d \left (b+a \cos \left (d x^2+c\right )\right )}-\frac {i b^2 x^4}{2 a^2 \left (a^2-b^2\right ) d}+\frac {b^2 \log \left (\frac {e^{i \left (d x^2+c\right )} a}{b-i \sqrt {a^2-b^2}}+1\right ) x^2}{a^2 \left (a^2-b^2\right ) d^2}+\frac {b^2 \log \left (\frac {e^{i \left (d x^2+c\right )} a}{b+i \sqrt {a^2-b^2}}+1\right ) x^2}{a^2 \left (a^2-b^2\right ) d^2}+\frac {2 b \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (d x^2+c\right )}}{b-\sqrt {b^2-a^2}}\right ) x^2}{a^2 \sqrt {b^2-a^2} d^2}-\frac {b^3 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (d x^2+c\right )}}{b-\sqrt {b^2-a^2}}\right ) x^2}{a^2 \left (b^2-a^2\right )^{3/2} d^2}-\frac {2 b \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (d x^2+c\right )}}{b+\sqrt {b^2-a^2}}\right ) x^2}{a^2 \sqrt {b^2-a^2} d^2}+\frac {b^3 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (d x^2+c\right )}}{b+\sqrt {b^2-a^2}}\right ) x^2}{a^2 \left (b^2-a^2\right )^{3/2} d^2}-\frac {i b^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (d x^2+c\right )}}{b-i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^3}-\frac {i b^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (d x^2+c\right )}}{b+i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^3}+\frac {2 i b \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (d x^2+c\right )}}{b-\sqrt {b^2-a^2}}\right )}{a^2 \sqrt {b^2-a^2} d^3}-\frac {i b^3 \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (d x^2+c\right )}}{b-\sqrt {b^2-a^2}}\right )}{a^2 \left (b^2-a^2\right )^{3/2} d^3}-\frac {2 i b \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (d x^2+c\right )}}{b+\sqrt {b^2-a^2}}\right )}{a^2 \sqrt {b^2-a^2} d^3}+\frac {i b^3 \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (d x^2+c\right )}}{b+\sqrt {b^2-a^2}}\right )}{a^2 \left (b^2-a^2\right )^{3/2} d^3} \]
[In]
[Out]
Rule 2221
Rule 2296
Rule 2317
Rule 2320
Rule 2438
Rule 2611
Rule 3402
Rule 3405
Rule 4276
Rule 4289
Rule 4618
Rule 6724
Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \text {Subst}\left (\int \frac {x^2}{(a+b \sec (c+d x))^2} \, dx,x,x^2\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \left (\frac {x^2}{a^2}+\frac {b^2 x^2}{a^2 (b+a \cos (c+d x))^2}-\frac {2 b x^2}{a^2 (b+a \cos (c+d x))}\right ) \, dx,x,x^2\right ) \\ & = \frac {x^6}{6 a^2}-\frac {b \text {Subst}\left (\int \frac {x^2}{b+a \cos (c+d x)} \, dx,x,x^2\right )}{a^2}+\frac {b^2 \text {Subst}\left (\int \frac {x^2}{(b+a \cos (c+d x))^2} \, dx,x,x^2\right )}{2 a^2} \\ & = \frac {x^6}{6 a^2}+\frac {b^2 x^4 \sin \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \cos \left (c+d x^2\right )\right )}-\frac {(2 b) \text {Subst}\left (\int \frac {e^{i (c+d x)} x^2}{a+2 b e^{i (c+d x)}+a e^{2 i (c+d x)}} \, dx,x,x^2\right )}{a^2}-\frac {b^3 \text {Subst}\left (\int \frac {x^2}{b+a \cos (c+d x)} \, dx,x,x^2\right )}{2 a^2 \left (a^2-b^2\right )}-\frac {b^2 \text {Subst}\left (\int \frac {x \sin (c+d x)}{b+a \cos (c+d x)} \, dx,x,x^2\right )}{a \left (a^2-b^2\right ) d} \\ & = -\frac {i b^2 x^4}{2 a^2 \left (a^2-b^2\right ) d}+\frac {x^6}{6 a^2}+\frac {b^2 x^4 \sin \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \cos \left (c+d x^2\right )\right )}-\frac {b^3 \text {Subst}\left (\int \frac {e^{i (c+d x)} x^2}{a+2 b e^{i (c+d x)}+a e^{2 i (c+d x)}} \, dx,x,x^2\right )}{a^2 \left (a^2-b^2\right )}-\frac {(2 b) \text {Subst}\left (\int \frac {e^{i (c+d x)} x^2}{2 b-2 \sqrt {-a^2+b^2}+2 a e^{i (c+d x)}} \, dx,x,x^2\right )}{a \sqrt {-a^2+b^2}}+\frac {(2 b) \text {Subst}\left (\int \frac {e^{i (c+d x)} x^2}{2 b+2 \sqrt {-a^2+b^2}+2 a e^{i (c+d x)}} \, dx,x,x^2\right )}{a \sqrt {-a^2+b^2}}-\frac {b^2 \text {Subst}\left (\int \frac {e^{i (c+d x)} x}{i b-\sqrt {a^2-b^2}+i a e^{i (c+d x)}} \, dx,x,x^2\right )}{a \left (a^2-b^2\right ) d}-\frac {b^2 \text {Subst}\left (\int \frac {e^{i (c+d x)} x}{i b+\sqrt {a^2-b^2}+i a e^{i (c+d x)}} \, dx,x,x^2\right )}{a \left (a^2-b^2\right ) d} \\ & = -\frac {i b^2 x^4}{2 a^2 \left (a^2-b^2\right ) d}+\frac {x^6}{6 a^2}+\frac {b^2 x^2 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^2}+\frac {b^2 x^2 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^2}+\frac {i b x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}-\frac {i b x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {b^2 x^4 \sin \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \cos \left (c+d x^2\right )\right )}+\frac {b^3 \text {Subst}\left (\int \frac {e^{i (c+d x)} x^2}{2 b-2 \sqrt {-a^2+b^2}+2 a e^{i (c+d x)}} \, dx,x,x^2\right )}{a \left (-a^2+b^2\right )^{3/2}}-\frac {b^3 \text {Subst}\left (\int \frac {e^{i (c+d x)} x^2}{2 b+2 \sqrt {-a^2+b^2}+2 a e^{i (c+d x)}} \, dx,x,x^2\right )}{a \left (-a^2+b^2\right )^{3/2}}-\frac {b^2 \text {Subst}\left (\int \log \left (1+\frac {i a e^{i (c+d x)}}{i b-\sqrt {a^2-b^2}}\right ) \, dx,x,x^2\right )}{a^2 \left (a^2-b^2\right ) d^2}-\frac {b^2 \text {Subst}\left (\int \log \left (1+\frac {i a e^{i (c+d x)}}{i b+\sqrt {a^2-b^2}}\right ) \, dx,x,x^2\right )}{a^2 \left (a^2-b^2\right ) d^2}-\frac {(2 i b) \text {Subst}\left (\int x \log \left (1+\frac {2 a e^{i (c+d x)}}{2 b-2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^2\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {(2 i b) \text {Subst}\left (\int x \log \left (1+\frac {2 a e^{i (c+d x)}}{2 b+2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^2\right )}{a^2 \sqrt {-a^2+b^2} d} \\ & = -\frac {i b^2 x^4}{2 a^2 \left (a^2-b^2\right ) d}+\frac {x^6}{6 a^2}+\frac {b^2 x^2 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^2}+\frac {b^2 x^2 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^2}-\frac {i b^3 x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}+\frac {i b x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {i b^3 x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}-\frac {i b x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {2 b x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}-\frac {2 b x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {b^2 x^4 \sin \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \cos \left (c+d x^2\right )\right )}+\frac {\left (i b^2\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {i a x}{i b-\sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{i \left (c+d x^2\right )}\right )}{a^2 \left (a^2-b^2\right ) d^3}+\frac {\left (i b^2\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {i a x}{i b+\sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{i \left (c+d x^2\right )}\right )}{a^2 \left (a^2-b^2\right ) d^3}-\frac {(2 b) \text {Subst}\left (\int \operatorname {PolyLog}\left (2,-\frac {2 a e^{i (c+d x)}}{2 b-2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^2\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {(2 b) \text {Subst}\left (\int \operatorname {PolyLog}\left (2,-\frac {2 a e^{i (c+d x)}}{2 b+2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^2\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {\left (i b^3\right ) \text {Subst}\left (\int x \log \left (1+\frac {2 a e^{i (c+d x)}}{2 b-2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^2\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d}-\frac {\left (i b^3\right ) \text {Subst}\left (\int x \log \left (1+\frac {2 a e^{i (c+d x)}}{2 b+2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^2\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d} \\ & = -\frac {i b^2 x^4}{2 a^2 \left (a^2-b^2\right ) d}+\frac {x^6}{6 a^2}+\frac {b^2 x^2 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^2}+\frac {b^2 x^2 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^2}-\frac {i b^3 x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}+\frac {i b x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {i b^3 x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}-\frac {i b x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}-\frac {i b^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b-i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^3}-\frac {i b^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b+i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^3}-\frac {b^3 x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^2}+\frac {2 b x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {b^3 x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^2}-\frac {2 b x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {b^2 x^4 \sin \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \cos \left (c+d x^2\right )\right )}+\frac {(2 i b) \text {Subst}\left (\int \frac {\operatorname {PolyLog}\left (2,\frac {a x}{-b+\sqrt {-a^2+b^2}}\right )}{x} \, dx,x,e^{i \left (c+d x^2\right )}\right )}{a^2 \sqrt {-a^2+b^2} d^3}-\frac {(2 i b) \text {Subst}\left (\int \frac {\operatorname {PolyLog}\left (2,-\frac {a x}{b+\sqrt {-a^2+b^2}}\right )}{x} \, dx,x,e^{i \left (c+d x^2\right )}\right )}{a^2 \sqrt {-a^2+b^2} d^3}+\frac {b^3 \text {Subst}\left (\int \operatorname {PolyLog}\left (2,-\frac {2 a e^{i (c+d x)}}{2 b-2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^2\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^2}-\frac {b^3 \text {Subst}\left (\int \operatorname {PolyLog}\left (2,-\frac {2 a e^{i (c+d x)}}{2 b+2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^2\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^2} \\ & = -\frac {i b^2 x^4}{2 a^2 \left (a^2-b^2\right ) d}+\frac {x^6}{6 a^2}+\frac {b^2 x^2 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^2}+\frac {b^2 x^2 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^2}-\frac {i b^3 x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}+\frac {i b x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {i b^3 x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}-\frac {i b x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}-\frac {i b^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b-i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^3}-\frac {i b^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b+i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^3}-\frac {b^3 x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^2}+\frac {2 b x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {b^3 x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^2}-\frac {2 b x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {2 i b \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^3}-\frac {2 i b \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^3}+\frac {b^2 x^4 \sin \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \cos \left (c+d x^2\right )\right )}-\frac {\left (i b^3\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}\left (2,\frac {a x}{-b+\sqrt {-a^2+b^2}}\right )}{x} \, dx,x,e^{i \left (c+d x^2\right )}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^3}+\frac {\left (i b^3\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}\left (2,-\frac {a x}{b+\sqrt {-a^2+b^2}}\right )}{x} \, dx,x,e^{i \left (c+d x^2\right )}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^3} \\ & = -\frac {i b^2 x^4}{2 a^2 \left (a^2-b^2\right ) d}+\frac {x^6}{6 a^2}+\frac {b^2 x^2 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^2}+\frac {b^2 x^2 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^2}-\frac {i b^3 x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}+\frac {i b x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {i b^3 x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}-\frac {i b x^4 \log \left (1+\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}-\frac {i b^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b-i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^3}-\frac {i b^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b+i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^3}-\frac {b^3 x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^2}+\frac {2 b x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {b^3 x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^2}-\frac {2 b x^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}-\frac {i b^3 \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^3}+\frac {2 i b \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^3}+\frac {i b^3 \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} d^3}-\frac {2 i b \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^3}+\frac {b^2 x^4 \sin \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \cos \left (c+d x^2\right )\right )} \\ \end{align*}
Time = 6.73 (sec) , antiderivative size = 895, normalized size of antiderivative = 0.82 \[ \int \frac {x^5}{\left (a+b \sec \left (c+d x^2\right )\right )^2} \, dx=\frac {\left (b+a \cos \left (c+d x^2\right )\right ) \sec ^2\left (c+d x^2\right ) \left (x^6 \left (b+a \cos \left (c+d x^2\right )\right )-\frac {3 b \left (b+a \cos \left (c+d x^2\right )\right ) \left (2 \left (1+e^{2 i c}\right ) \left (i b \sqrt {\left (-a^2+b^2\right ) e^{2 i c}}-2 a^2 d e^{i c} x^2+b^2 d e^{i c} x^2\right ) \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (2 c+d x^2\right )}}{b e^{i c}-\sqrt {\left (-a^2+b^2\right ) e^{2 i c}}}\right )+2 \left (1+e^{2 i c}\right ) \left (i b \sqrt {\left (-a^2+b^2\right ) e^{2 i c}}+2 a^2 d e^{i c} x^2-b^2 d e^{i c} x^2\right ) \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (2 c+d x^2\right )}}{b e^{i c}+\sqrt {\left (-a^2+b^2\right ) e^{2 i c}}}\right )+i \left (d x^2 \left (2 b d e^{2 i c} \sqrt {\left (-a^2+b^2\right ) e^{2 i c}} x^2+\left (1+e^{2 i c}\right ) \left (2 i b \sqrt {\left (-a^2+b^2\right ) e^{2 i c}}-2 a^2 d e^{i c} x^2+b^2 d e^{i c} x^2\right ) \log \left (1+\frac {a e^{i \left (2 c+d x^2\right )}}{b e^{i c}-\sqrt {\left (-a^2+b^2\right ) e^{2 i c}}}\right )+\left (1+e^{2 i c}\right ) \left (2 i b \sqrt {\left (-a^2+b^2\right ) e^{2 i c}}+2 a^2 d e^{i c} x^2-b^2 d e^{i c} x^2\right ) \log \left (1+\frac {a e^{i \left (2 c+d x^2\right )}}{b e^{i c}+\sqrt {\left (-a^2+b^2\right ) e^{2 i c}}}\right )\right )-2 \left (2 a^2-b^2\right ) e^{i c} \left (1+e^{2 i c}\right ) \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (2 c+d x^2\right )}}{b e^{i c}-\sqrt {\left (-a^2+b^2\right ) e^{2 i c}}}\right )+2 \left (2 a^2-b^2\right ) e^{i c} \left (1+e^{2 i c}\right ) \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (2 c+d x^2\right )}}{b e^{i c}+\sqrt {\left (-a^2+b^2\right ) e^{2 i c}}}\right )\right )\right )}{\left (a^2-b^2\right ) d^3 \sqrt {\left (-a^2+b^2\right ) e^{2 i c}} \left (1+e^{2 i c}\right )}+\frac {3 b^2 x^4 \left (-b \sin (c)+a \sin \left (d x^2\right )\right )}{(a-b) (a+b) d \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right )}\right )}{6 a^2 \left (a+b \sec \left (c+d x^2\right )\right )^2} \]
[In]
[Out]
\[\int \frac {x^{5}}{{\left (a +b \sec \left (d \,x^{2}+c \right )\right )}^{2}}d x\]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 3050 vs. \(2 (958) = 1916\).
Time = 0.51 (sec) , antiderivative size = 3050, normalized size of antiderivative = 2.79 \[ \int \frac {x^5}{\left (a+b \sec \left (c+d x^2\right )\right )^2} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {x^5}{\left (a+b \sec \left (c+d x^2\right )\right )^2} \, dx=\int \frac {x^{5}}{\left (a + b \sec {\left (c + d x^{2} \right )}\right )^{2}}\, dx \]
[In]
[Out]
\[ \int \frac {x^5}{\left (a+b \sec \left (c+d x^2\right )\right )^2} \, dx=\int { \frac {x^{5}}{{\left (b \sec \left (d x^{2} + c\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {x^5}{\left (a+b \sec \left (c+d x^2\right )\right )^2} \, dx=\int { \frac {x^{5}}{{\left (b \sec \left (d x^{2} + c\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {x^5}{\left (a+b \sec \left (c+d x^2\right )\right )^2} \, dx=\int \frac {x^5}{{\left (a+\frac {b}{\cos \left (d\,x^2+c\right )}\right )}^2} \,d x \]
[In]
[Out]